<html>
<head><meta charset="utf-8"><title>Including compiler sources in rustc-dev component · t-compiler · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/index.html">t-compiler</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html">Including compiler sources in rustc-dev component</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210395131"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210395131" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210395131">(Sep 17 2020 at 14:10)</a>:</h4>
<p>It would be nice if installing the <code>rustc-dev</code> component also installed the compiler sources. This would allow using rust-analyzer to work on compiler plugins/backends. Are there reasons not to do this, other than increasing component size?</p>



<a name="210395714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210395714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210395714">(Sep 17 2020 at 14:14)</a>:</h4>
<p>no particular reason. we'd need to be careful to avoid conflicts with rust-src; it might make sense to install to a separate directory. That might happen naturally, I'm not sure.</p>



<a name="210458552"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210458552" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210458552">(Sep 17 2020 at 22:19)</a>:</h4>
<p>Opened <a href="https://github.com/rust-lang/rust/pull/76856">https://github.com/rust-lang/rust/pull/76856</a> for this</p>



<a name="210486123"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210486123" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210486123">(Sep 18 2020 at 07:22)</a>:</h4>
<p>Why would there be conflicts with rust-src? rust-src is in <code>lib/rustlib/rust-src/rust/library</code>. The compiler source could be in <code>lib/rustlib/rust-src/rust/compiler</code>.</p>



<a name="210499525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210499525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Phil H <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210499525">(Sep 18 2020 at 10:08)</a>:</h4>
<p>I think this might also help with <a href="https://github.com/rust-lang/rust-clippy/issues/5803">https://github.com/rust-lang/rust-clippy/issues/5803</a> (getting RA to work with Clippy properly)</p>



<a name="210499540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210499540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210499540">(Sep 18 2020 at 10:08)</a>:</h4>
<p>Yeah</p>



<a name="210499576"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210499576" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210499576">(Sep 18 2020 at 10:09)</a>:</h4>
<p><span class="user-mention silent" data-user-id="133247">bjorn3</span> <a href="#narrow/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component/near/210486123">said</a>:</p>
<blockquote>
<p>Why would there be conflicts with rust-src? rust-src is in <code>lib/rustlib/rust-src/rust/library</code>. The compiler source could be in <code>lib/rustlib/rust-src/rust/compiler</code>.</p>
</blockquote>
<p>Both of them will ship <code>Cargo.lock</code>, which would collide. I'm not sure if that lockfile is actually useful though, since AFAICT the workspace manifest is missing.</p>



<a name="210507745"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210507745" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210507745">(Sep 18 2020 at 11:48)</a>:</h4>
<blockquote>
<p>Both of them will ship Cargo.lock, which would collide. I'm not sure if that lockfile is actually useful though, since AFAICT the workspace manifest is missing.</p>
</blockquote>
<p>It is very useful to xargo and by extension Miri, to ensure we build the standard library with the right version of everything. We used to have failures every few months when a crate imported by stdlib was updated and not compatible.</p>



<a name="210507831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210507831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210507831">(Sep 18 2020 at 11:49)</a>:</h4>
<p><span class="user-mention silent" data-user-id="211727">Jonas Schievink</span> <a href="#narrow/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component/near/210395131">said</a>:</p>
<blockquote>
<p>It would be nice if installing the <code>rustc-dev</code> component also installed the compiler sources. This would allow using rust-analyzer to work on compiler plugins/backends. Are there reasons not to do this, other than increasing component size?</p>
</blockquote>
<p>I thought compiler plugins are on the way out?</p>



<a name="210507903"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210507903" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bjorn3 <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210507903">(Sep 18 2020 at 11:50)</a>:</h4>
<p>Compiler plugins are, but custom drivers and codegen backends are not I hope :)</p>



<a name="210507922"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210507922" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210507922">(Sep 18 2020 at 11:51)</a>:</h4>
<p>sure :) I was just wondering about that specific example.</p>



<a name="210510751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210510751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210510751">(Sep 18 2020 at 12:22)</a>:</h4>
<p>Ah yeah that's what I meant</p>



<a name="210510776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/131828-t-compiler/topic/Including%20compiler%20sources%20in%20rustc-dev%20component/near/210510776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jonas Schievink  [he/him] <a href="https://rust-lang.github.io/zulip_archive/stream/131828-t-compiler/topic/Including.20compiler.20sources.20in.20rustc-dev.20component.html#210510776">(Sep 18 2020 at 12:23)</a>:</h4>
<p>Custom drivers, linters, codegen backends, anything that needs to link to rustc crates</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>